package com.sz.biz.common.base.dto;

import com.sz.common.base.entity.Entity;

/**
 * Package: com.sz.biz.common.base.dto <br>
 * Function: TODO: ADD FUNCTION <br>
 * Author: Charles. <br>
 * Date: 2017-04-13 11:06:00.
 */
public class CityModel implements Entity {

    /**
     * 地区Id
     */
    private String id;
    /**
     * 地区名称
     */
    private String cityName;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public CityModel() {
    }

    public CityModel(String id, String cityName) {
        this.id = id;
        this.cityName = cityName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        CityModel cityModel = (CityModel) o;

        if (id != null ? !id.equals(cityModel.id) : cityModel.id != null) {
            return false;
        }
        return cityName != null ? cityName.equals(cityModel.cityName) : cityModel.cityName == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (cityName != null ? cityName.hashCode() : 0);
        return result;
    }
}
